com.highdeal.pnr.tif
Class Detail

java.lang.Object
  extended by com.highdeal.pnr.tif.Detail
All Implemented Interfaces:
XMLMarshallable

public class Detail
extends java.lang.Object
implements XMLMarshallable

This class is used to give more details about the transaction.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:simpleType name="detailType">
   <xs:restriction base="xs:string">
      <xs:enumeration value="decimal"/>
      <xs:enumeration value="string"/>
      <xs:enumeration value="date"/>
   </xs:restriction>
 </xs:simpleType>
<xs:element name="detail">
   <xs:complexType>
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="type" type="detailType"/>
    <xs:attribute name="value" type="xs:string"/>
   </xs:complexType>
  </xs:element>


Constructor Summary
Detail()
          Constructs an empty transaction detail.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.util.Date getDateValue()
          Returns the value of the detail; The result is null if the detail value is not a date.
 java.math.BigDecimal getDecimalValue()
          Returns the value of the detail.
 java.lang.String getName()
          Returns the name of the detail.
 java.lang.String getStringValue()
          Returns the value of the detail; The result is null if the detail value is not a string.
 int getType()
          Returns the type of the detail; The type can be: NUMBER, STRING, or DATE.
 java.lang.Object getValue()
          Returns the value of the detail.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
static void marshal(XMLOutputter output, java.lang.String name, java.lang.Object value)
          Helper static method to marshal a detail.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Detail

public Detail()
Constructs an empty transaction detail.

Method Detail

getName

public java.lang.String getName()
Returns the name of the detail.

Returns:
The name of the detail

getValue

public java.lang.Object getValue()
Returns the value of the detail.

Returns:
The value of the detail

getStringValue

public java.lang.String getStringValue()
Returns the value of the detail; The result is null if the detail value is not a string.

Returns:
The value of the detail

getDateValue

public java.util.Date getDateValue()
Returns the value of the detail; The result is null if the detail value is not a date.

Returns:
The value of the detail

getDecimalValue

public java.math.BigDecimal getDecimalValue()
Returns the value of the detail. The result is null if the detail value is not a decimal.

Returns:
The value of the detail

getType

public int getType()
Returns the type of the detail; The type can be: NUMBER, STRING, or DATE.

Returns:
The type of the detail

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

marshal

public static void marshal(XMLOutputter output,
                           java.lang.String name,
                           java.lang.Object value)
Helper static method to marshal a detail.

Parameters:
output - The XML outputter where the output has to go
name - The name of the detail
value - The value of the detail

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)